package com.joezj.leetcode.commonUtils.controller;

import com.joezj.leetcode.commonUtils.task.CallBackTask;

/**
 * @Author: JoeZj
 * @Description:
 * @Date: create in 2020/9/8 0:08
 */
public class ExecuteController{


    public void analysis(CallBackTask task, Object... params) {
        long startTime = System.currentTimeMillis();
        Object result = task.analysis(params);
        long endTime = System.currentTimeMillis();
        long costTime = endTime - startTime;
        System.out.printf("任务执行完成，用时：%d ms \r", costTime);
        System.out.printf("执行结果：{}", result.toString());
    }
}
